package org.timeticker.gui;

import org.timeticker.Project;
import org.timeticker.ProjectList;

/**
 * Projects table model
 *
 * @author Ivan Latysh
 * @version 0.1
 * @since 13-Aug-2007 : 8:25:39 PM
 */
public class ProjectsTableModel extends ObjectListTableModel<Project> {

  /**
   * Return project list
   *
   * @return project list
   */
  public ProjectList getProjectList() {
    return (ProjectList) getObjects();
  }

  /**
   * Create a new table model for given project list
   * @param projects project list
   */
  public ProjectsTableModel(ProjectList projects) {
    super(projects);
    // set up columns
    columns.add(new ObjectListTableModelColumn("Title", String.class, "title"));
    columns.add(new ObjectListTableModelColumn("Comments", String.class, "comments"));
  }

}
